* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html, body {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #0d0603;
    color: white;
    display: flex;
    flex-direction: column;
}



.logo { height: 40px; width: auto; cursor: pointer; }
.nav-center { flex-grow: 1; max-width: 400px; margin: 0 20px; }
.search-input { width: 100%; padding: 8px 15px; border-radius: 20px; border: none; outline: none; background-color: #333; color: white; }
.volume-container { display: flex; align-items: center; gap: 8px; }
.sound-btn { background: transparent; border: none; font-size: 18px; cursor: pointer; }
.volume-slider { width: 70px; height: 4px; accent-color: white; cursor: pointer; }
.icon-link, .profile-icon { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.profile-icon svg { display: block; }

/* Sidebar */
.sidebar {
    position: fixed;
    top: 60px;
    left: -250px;
    width: 250px;
    height: calc(100vh - 60px);
    background-color: #222222;
    transition: left 0.3s ease;
    z-index: 999;
}

.sidebar.active { left: 0; }
.sidebar ul { list-style: none; padding: 20px; }
.sidebar ul li { margin-bottom: 15px; }
.sidebar ul li a { color: white; text-decoration: none; font-size: 18px; display: block; padding: 8px; border-radius: 4px; }

/* Dynamischer Animierter Zurück-Button */
.back-btn-top {
    position: fixed;
    background-color: rgba(34, 34, 34, 0.95);
    color: #ffcc00;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    z-index: 2000;
    border: 1px solid rgba(255, 204, 0, 0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    white-space: nowrap;
    /* Fließende Animation für Flug & Transparenz */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease;
}

/* Versteckt am Anfang */
.back-btn-top.hidden-btn {
    opacity: 0;
    pointer-events: none;
    top: 0;
    left: 0;
    transform: translate(20px, 75px) scale(0.8);
}

/* Modus 1: Oben links beim Lesen */
.back-btn-top.top-left-mode {
    opacity: 1;
    pointer-events: auto;
    top: 0;
    left: 0;
    transform: translate(20px, 75px) scale(1);
}

/* Modus 2: Fliegt exakt unter den "Von vorne lesen"-Button auf der Endseite */
.back-btn-top.center-mode {
    opacity: 1;
    pointer-events: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 65px) scale(1);
}

/* Hauptbereich */
.law-container {
    flex: 1;
    margin-top: 60px;
    height: calc(100vh - 95px);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 0;
}

/* Start Overlay */
.start-overlay {
    position: absolute;
    inset: 0;
    backdrop-filter: blur(12px) brightness(0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.start-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.start-card {
    background-color: rgba(30, 30, 30, 0.9);
    padding: 35px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.start-card h1 {
    font-size: 2rem;
    margin-bottom: 25px;
    color: #ffcc00;
}

.start-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.start-btn, .cancel-btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.start-btn { background-color: #ffcc00; color: #000; }
.cancel-btn { background-color: #444; color: #fff; }

/* Holztisch */
.wooden-table {
    width: 100%;
    height: 100%;
    background: #2b1810 radial-gradient(circle at center, #3d2317 0%, #150905 100%);
    box-shadow: inset 0 0 80px rgba(0,0,0,0.8);
    padding: 25px 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* 2-Seiten Buch Design */
.book {
    width: 100%;
    max-width: 1280px;
    height: 100%;
    background-color: #f4ecd8;
    color: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.9);
    position: relative;
    display: flex;
    border-left: 14px solid #1c3b57; /* Blau/Dunkler Akzent passend zum System-Buch */
    border-right: 14px solid #1c3b57;
    border-top: 4px solid #102436;
    border-bottom: 4px solid #102436;
}

/* Mittelfalte im Buch */
.book-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 26px;
    transform: translateX(-50%);
    background: linear-gradient(to right, 
        rgba(0,0,0,0.25) 0%, 
        rgba(0,0,0,0.05) 30%, 
        rgba(0,0,0,0.4) 50%, 
        rgba(0,0,0,0.05) 70%, 
        rgba(0,0,0,0.25) 100%);
    z-index: 20;
    pointer-events: none;
}

/* Container für beide Seiten */
.book-pages-container {
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
}

.book-page {
    width: 50%;
    height: 100%;
    padding: 25px 35px 35px 35px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.left-page {
    border-right: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset -15px 0 20px -10px rgba(0,0,0,0.15);
}

.right-page {
    box-shadow: inset 15px 0 20px -10px rgba(0,0,0,0.15);
}

/* Seitenzahl unten */
.page-number {
    position: absolute;
    bottom: 10px;
    font-size: 0.8rem;
    color: #777;
    font-weight: bold;
}

.left-page .page-number { left: 20px; }
.right-page .page-number { right: 20px; }

/* Buch-Blätter Animationen */
.page-turn-next { animation: flipNext 0.4s ease-in-out forwards; }
.page-turn-prev { animation: flipPrev 0.4s ease-in-out forwards; }

@keyframes flipNext {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes flipPrev {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

/* Typografie */
.book-page h2 {
    font-size: 1.25rem;
    color: #1c3b57;
    margin-bottom: 3px;
    border-bottom: 2px solid #1c3b57;
    padding-bottom: 3px;
}

.book-page h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.paragraph-item { margin-bottom: 12px; }
.paragraph-title { font-size: 0.98rem; font-weight: bold; color: #2c3e50; margin-bottom: 4px; }
.paragraph-item ul { list-style: none; padding-left: 4px; }
.paragraph-item li { font-size: 0.84rem; line-height: 1.4; margin-bottom: 4px; }

/* Endseite */
.book-end-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;
}

.end-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.end-page h2 {
    border: none;
    font-size: 2rem;
    margin-bottom: 20px;
    color: #1c3b57;
}

.end-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.restart-btn {
    background-color: #1c3b57;
    color: #fff;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Navigations-Pfeile */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(28, 59, 87, 0.85);
    color: white;
    border: none;
    width: 40px;
    height: 55px;
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 6px;
    z-index: 40;
    transition: background-color 0.2s;
}

.nav-arrow:hover { background-color: #1c3b57; }
.prev-arrow { left: -18px; }
.next-arrow { right: -18px; }

/* Footer */
footer {
    height: 35px;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #ccc;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10;
}

/* 1. Große Monitore / Extra Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* 2. Normale Laptops & Desktop-Monitore */
@media (max-width: 1200px) {
    .page-content {
        width: 95%;
    }
}

/* 3. Tablets (Querformat) & kleinere Laptops */
@media (max-width: 992px) {
    .support-layout {
        grid-template-columns: 1fr; /* Wechsel von 2 auf 1 Spalte */
    }
}

/* 4. Tablets (Hochformat) */
@media (max-width: 768px) {
    .navbar {
        padding: 0 10px;
    }
    
    .sidebar {
        width: 100%; /* Vollbild-Menü auf Mobilgeräten */
    }
}

/* 5. Smartphones */
@media (max-width: 576px) {
    body {
        font-size: 14px;
    }

    .nav-center {
        display: none; /* Suchleiste ausblenden für mehr Platz */
    }

    h1 {
        font-size: 1.5rem;
    }
}